home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / pcmagazi / 1989 / 19 / 1stclass.doc < prev    next >
Text File  |  1989-10-02  |  9KB  |  183 lines

  1. UTILITIES  Pete Maclean              
  2. Vol. 8, No. 19                      
  3.  
  4. 1STCLASS and COURIERS
  5. Commands
  6.  
  7. Pete Maclean  November 14, 1989 (Utilities)
  8.  
  9.  
  10. Purpose: 1STCLASS helps you manage your MCI mail as well as send and receive
  11.          ASCII and/or binary files. It requires the use of COURIERS, a 1.5KB
  12.          TSR serial port driver program, and a customized script file, 
  13.          1STCLASS.CSF.
  14.  
  15. Format:    COURIERS
  16.     1STCLASS
  17.  
  18. Remarks: Troubleshooting Tips: If MCI finds faults with a message 1STCLASS 
  19.          uploads, an explanation will be displayed. Such diagnostics are not
  20.          written to 1STCLASS.IN but, if you lose the display, you can always
  21.          find it in MAIL.LOG.
  22.  
  23.      The most common problem is misformatted envelopes.  For a message to
  24.          be delivered, the subscriber must be exactly identified.  If you 
  25.          address a message to a name that's not unique, the IDs of all 
  26.          subscribers with the name are listed:  
  27.  
  28.      At least one problem with envelope 
  29.      608 More than 1 MCI Mail user matches recipient information
  30.      MCI ID   Name         Organization       Location
  31.      000-0000 Zoltan Shah  Whizzo Chocolate   New York, NY
  32.      111-1111 Zoltan Shah  Sunshine Desserts  Fresno, CA
  33.  
  34.         Select the right one and edit your message to include the ID. 
  35.         Remember that the name should be separated from the ID by a slash, 
  36.         as in Zoltan Shah/111-1111.  In fact, an ID alone is a perfectly 
  37.         acceptable address.
  38.     
  39.     If MCI objects to something in the envelope of a message, you may 
  40.         receive a repsonse such as:
  41.  
  42.     At least one problem with envelope 
  43.     610 Improper information in the envelope 
  44.     SUBJECT:  1STCLASS
  45.     This text is part of the message...
  46.  
  47.     In this case, the blank line needed to terminate the envelope was 
  48.         missing.  Other causes might be a mistyped keyword on an envelope 
  49.         line or the appearance of lines in an order that MCI cannot handle.
  50.  
  51.     Some errors offend MCI so much that it stops responding, 
  52.     such as a message with two or more addresses on a line. 
  53.     A message may be addressed to any number of people, but each address 
  54.         must be on a separate To: or Cc: line.
  55.  
  56.     And, if you receive either a Checksum error or Malformed data message,
  57.         you can be almost certain that a transmission error has ruined your 
  58.         session.  Just try again.
  59.     
  60.     TIPS FOR USING OUR COURIERS UTILITY
  61.  
  62.     The general format follows that of BIOS calls. The caller places a 
  63.         function code in AH, a COM-port number (1 - 4) in AL and parameters 
  64.         as necessary in AX, BX and CX, then executes an INT 14H instruction. 
  65.         COURIERS returns result codes in AX.
  66.  
  67.     Function 80h: Check if COURIERS is loaded. If COURIERS is loaded it 
  68.         returns 232 (decimal) in AH; otherwise the BIOS returns some 
  69.         indeterminable value. Any program using COURIERS should start by 
  70.         verifying that COURIERS is loaded and asking the user to load it if
  71.         not  -- just as 1STCLASS does. (AL is ignored in this case.)
  72.  
  73.     Function 81h: Check if port is busy. COURIERS returns a code in AH:
  74.         2 means that the port does not exist; 1 means that the port exists 
  75.         and another program is using it; 0 means that the port is available.
  76.     
  77.     COURIERS reports code 1 only if another program is using the port via
  78.         COURIERS' own services. There would be no way to tell with any 
  79.         confidence if another program were using a port in some other way.
  80.         1STCLASS skips this nicety and seizes the port it is told to use.
  81.  
  82.         Function 82h: Configure a port. Before doing any I/O, a program should
  83.         configure the port with this function. The line speed in bits per 
  84.         second is passed in BX and CX contains a bit vector of various options.
  85.         Only the low two bits are currently assigned: Bit 0001h tells COURIERS 
  86.         to handle input flow control; Bit 0002h tells COURIERS to handle output
  87.         flow control.
  88.     
  89.     Input flow control means that COURIERS will send Control-Ss and 
  90.         Control-Qs to regulate the flow of incoming characters. Output flow 
  91.         control means that COURIERS will regulate its character transmission
  92.         according to Control-Ss and Control-Qs that it receives.
  93.     
  94.     In addition bit 0004h is reserved for requesting COURIERS to operate
  95.         the line under the X.PC protocol. This is not yet implemented.
  96.     
  97.     When configuring the port, COURIERS sets it to send and receive 
  98.         eight-bit characters with one stop bit and no parity. There are 
  99.         currently no alternatives.
  100.  
  101.     Function 83h: Start input. This function provides COURIERS with the 
  102.         specifications of an area of memory that COURIERS can use as a 
  103.         circular buffer for incoming characters. ES:BX point to the buffer and
  104.         CX contains its length in bytes. If input flow control is requested
  105.         then the buffer should be at least 128 bytes. The largest allowable 
  106.         buffer is 65,536 bytes, the size of a memory segment. The address 
  107.         provided for the buffer must be such that every byte in it can be 
  108.         addressed using the segment provided in ES. COURIERS does not check 
  109.         for this, however, and if provided, say, with a buffer address of 
  110.         1F1D:F000 and a size of 40,000 it would fail rather horribly.
  111.     
  112.     After input is initiated with this function, it continues until the 
  113.         port is deconfigured (function 8D). It is very important that a program
  114.         deconfigure a port after using it or else COURIERS could be left 
  115.         stuffing stray characters into an area of memory being used by another
  116.         program for some completely different purpose. And that could lead to 
  117.         horrible bugs.
  118.  
  119.     Function 84h: Read a character. This function requests that COURIERS
  120.         extract the next character from its input buffer and return it to the
  121.         program. On returning, COURIERS sets the ZF processor flag to indicate
  122.         whether or not input was available. ZF = 1 means that no input was 
  123.         available. If ZF = 0 then COURIERS also returns a character in AL 
  124.         along with a copy of the status bits read from the COM port in AH.
  125.     Note that there is no way to get COURIERS to wait for incoming data.
  126.         If a program just wants to spin its wheels until a character shows up 
  127.         it should invoke this function in a loop until ZF is returned as zero.
  128.  
  129.     In most cases it is safe to ignore the status bits. The only one that
  130.         might possibly have meaning is the status bit that denotes a framing
  131.         error on the received character. Note, however, that COURIERS adds one
  132.         status bit of its own, the highest or sign bit, to indicate an input 
  133.         buffer overflow. If input flow control is turned on and operating 
  134.         correctly, and the buffer is sufficiently large, an overflow should 
  135.         never occur.
  136.  
  137.     Function 85h: Flush pending input. COURIERS discards any characters 
  138.         waiting to be read from its input buffer.
  139.  
  140.     Function 86h: Start output. COURIERS initiates the transmission of a
  141.         sequence of characters. ES:BX points to the data and CX contains the 
  142.         byte count. COURIERS returns to the calling program once the 
  143.         transmission is under way; it does not wait until transmission is 
  144.         complete.
  145.     The same caveats about buffer addressing given for the input function
  146.         (84h) apply equally here.
  147.  
  148.     Function 87h: Output status. COURIERS returns the number of characters
  149.         awaiting transmission in AX. It is only safe to initiate another 
  150.         transmission when the returned value is zero. The ZF flag is also set 
  151.         to indicate if AX is zero or not.  To wait for completion of a 
  152.         transmission a program should call function 86 and then repeatedly 
  153.         call 87 until a zero value is returned.
  154.  
  155.     Function 88h: Abort output. COURIERS terminates any transmission in 
  156.         progress.
  157.  
  158.     Function 89h: Transmit a single character. COURIERS transmits the 
  159.         character passed in CL. This function may be called repeatedly with no
  160.         tests or checks between calls. It would be used typically by a program
  161.         such as a terminal emulator.
  162.  
  163.     Function 8Ah: Send BREAK. COURIERS transmits a BREAK condition for 
  164.         approximately 385 milliseconds. Note that COURIERS does not detect 
  165.         receipt of a BREAK.
  166.  
  167.     Function 8Bh:  (Not used).
  168.  
  169.     Function 8Ch: Set speed. COURIERS resets the speed of the port. The
  170.         caller provides this speed in BX. 1STCLASS uses this function to 
  171.         change speeds when a connection is completed at a speed other than 
  172.         that for which the modem was primed.
  173.  
  174.     Function 8Dh: Deconfigure port. COURIERS stops input on the port and 
  175.         turns off all interrupts. As discussed above, it is very important 
  176.         that a program invoke this function upon completing use of a COM port.
  177.     A summary of the functions with the registers and returned values is 
  178.         given in Figure A. -- 
  179.  
  180.  
  181.  
  182.  
  183.